<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$cid=intval($_RQ['cid']);
	$return['welcomehdps']=$return['pluginset']['welcomehdps'];
	if(count($return['welcomehdps'])>0 && $return['pluginset']['iswelcome']==1){
		$return['iswelcome']=$this->session('iswelcome')?0:1;
		if($return['iswelcome']){
			$this->session('iswelcome',1);
		}
	}
	$return['pluginset']['searchkeyword']=$return['pluginset']['searchkeyword']?explode('|',$return['pluginset']['searchkeyword']):array('美甲','美体','保洁','家政','维修');
	$return['member']=cfc('core')->get_member($_SESSION['uid']);
	$pindex = max(1, intval($post['page']));
	$psize = 10;
	$total='';
	$sharelink='jy_mfuwu/merchlist//cid='.$cid.'&fromuser='.$_SESSION['uid'];
	$share_image=$return['fuwucate']['image']?:$setting['share_image'];
	$return['sharedata']=array(
			'title'=>$return['fuwucate']['catename']?:$setting['share_title'],
			'desc'=>$setting['share_desc']?$setting['share_desc']:'服务上门，一个属于商户自己的服务平台！',
			'link'=>custom_url($sharelink,true),
			'imgUrl'=>tomedia($share_image)
	);
	$return['list']=array();
	$return['pcd']=array();
	if(!$cid){
		$return['allcates']=pdo_getall('jy_merch_fuwucate',array('uniacid'=>$_SESSION['uniacid'],'status'=>1));
	}
	$return['fuwucate']==pdo_get('jy_merch_fuwucate',array('id'=>$cid,'uniacid'=>$_SESSION['uniacid']));
	$return['fuwucate']['keywords']=$return['bankuai']['keywords']?explode('|',$return['fuwucate']['keywords']):array('热门词1','热门词2');
	$return['coupons']=model('jy_weishop/coupon')->getmerchcoupon(0,1);
	$return['params']=array('page'=>1,'cid'=>$cid,'pid'=>'all','getgoods'=>1);
	set_html('title',$return['fuwucate']['catename']?:'服务上门');
	exi($return);
}
?>